package com.fxz.oauth.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;
import org.springframework.security.core.userdetails.UserDetails;

import java.io.Serializable;
import java.util.Set;

/**
 * @author Fxz
 * @version 1.0
 * @date 2021-08-03 16:17
 */
@AllArgsConstructor
@NoArgsConstructor
@With
@Builder
@Data
public class User implements UserDetails, Serializable {

    @TableId
    private Long id;
    private String username;
    @JsonIgnore
    private String password;
    private String mobile;
    private String email;
    private String name;
    private boolean enabled;
    private boolean accountNonExpired;
    private boolean accountNonLocked;
    private boolean credentialsNonExpired;
    @TableField(exist = false)
    private Set<Role> authorities;



}
